import csv

dh_filter = set()
with open('dh_combined_object_ids.txt') as dh_file:
    for object_id in dh_file:
        dh_filter.add(object_id.strip())

with open('bz_diff.csv', 'w') as diff_out:
    diff_writer = csv.writer(diff_out, delimiter=',')

    with open('bz_device_object_id_and_name.csv') as bz_file:
        bz_reader = csv.reader(bz_file, delimiter=',')

        for row in bz_reader:
            if row[0] not in dh_filter:
                diff_writer.writerow(row)
